package com.xt.purchasingsystem.service.productionManagementService;


import com.xt.purchasingsystem.dto.MDesignProcedureDetailsDto;
import com.xt.purchasingsystem.dto.MDesignProcedureDto;
import com.xt.purchasingsystem.model.MDesignProcedure;
import com.xt.purchasingsystem.utils.Result;

/**
 * 生产管理--工序物料设计业务
 * Author: 老姚
 * Date:  2020/3/17 21:30
 */
public interface ProcessMaterialDesignService {
    /**
     * 分页查询所有 已审核 工序物料未设计 的产品生产工序单的业务
     * @return
     */
    Result queryAllapprovedMDesignProcedureByPaging(MDesignProcedureDto mDesignProcedureDto);

    /**
     * 根据产品编号查询此产品所有物料的业务
     * @return
     */
    Result queryAllDModuleDetailsByProductId(String productId, Integer currNo, Integer pageSize);

    /**
     * 根据产品工序编号查询此工序所有物料
     * @param procudureId
     * @return
     */
    Result getAllMDesignProcedureModuleByProcudureId(Integer procudureId);

    /**
     * 产品生产工序设计物料的业务
     * @param mDesignProcedureDetailsDto
     * @return
     */
    Result designMaterial(MDesignProcedureDetailsDto mDesignProcedureDetailsDto);

    /**
     * 产品生产工序重新设计物料的业务
     * @param mDesignProcedureDetailsDto
     * @return
     */
    Result redesign(MDesignProcedureDetailsDto mDesignProcedureDetailsDto);

    /**
     *提交设计单的业务
     * @param id
     * @return
     */
    Result submitProcessMaterialDesignSheet(Integer id, String productId);

    /**
     * 检查是否还有剩余物料的业务
     * @param productId
     * @return
     */
    Result checkMaterialResidualAmount(String productId);

    /**
     * 分页查询所有 已审核 工序物料已提交 的产品生产工序单的业务
     * @param mDesignProcedureDto
     * @return
     */
    Result queryAllMDesignProcedureModuleBycheckedAndMaterialDesigned(MDesignProcedureDto mDesignProcedureDto);

    /**
     * 审核工序物料设计单的业务
     * @param mdesignProcedure
     * @return
     */
    Result reviewProcessMaterialDesignList(MDesignProcedure mdesignProcedure);
}
